package interviewpreparationkit.sorting


import redirectSystemIn
import redirectSystemOut
import org.junit.jupiter.api.Test
import java.util.*

class ActivityNotificationsTests {
    @Test
    fun activityNotificationsTest() {
        redirectSystemIn(this.javaClass) {
            val scan = Scanner(System.`in`)
            redirectSystemOut {
                while (scan.hasNextLine()) {
                    val nd = scan.nextLine().split(" ")

                    val n = nd[0].trim().toInt()

                    val d = nd[1].trim().toInt()

                    val expenditure = scan.nextLine().split(" ").map { it.trim().toInt() }.toTypedArray()

                    val result = activityNotifications(expenditure, d)

                    println(result)
                    it.add(scan.nextLine().trim())

//                    break
                }
            }
        }
    }
}